﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SampleProject._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        Hello world!! Updated to include database feed
    </div>
    <div>
        <asp:UpdatePanel ID="upComments" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
        <asp:Repeater ID="rptComments" runat="server" DataSourceID="sqlComments">
            <ItemTemplate>
                <p>
                    <%# DataBinder.Eval(Container.DataItem, "Comment") %></p>
            </ItemTemplate>
        </asp:Repeater>        
        </ContentTemplate>
        </asp:UpdatePanel>
        <asp:SqlDataSource ID="sqlComments" runat="server" ConnectionString="<%$ ConnectionStrings:SampleApplicationConnectionString %>"
            SelectCommand="SELECT * FROM [SampleApplication.Comments] ORDER BY [TimeStamp]">
        </asp:SqlDataSource>
    </div>
    <div>
    Enter comment:
        <asp:TextBox ID="txtComment" runat="server"></asp:TextBox>
        <asp:Button ID="btnPost" runat="server" Text="Post" onclick="btnPost_Click" />
        <asp:UpdatePanel ID="upError" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:Label ID="lblError" ForeColor="Red" runat="server" Text=""></asp:Label>
        </ContentTemplate>
        </asp:UpdatePanel>
        
    </div>
    </form>
    Version:
    <asp:Label ID="lblVersion" runat="server" Text="Label"></asp:Label>
</body>
</html>
